<include file="common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('Auth/administrators')}">管理员列表</a>
</div>

<div class="permissions-content">
    <div class="permissions-le">
        <div class="add-msg">
            <a class="add-role" href="{:U('Auth/add_administrators')}">新增管理员</a>
            <div class="add-form">
                <form method="get" action="">
                    <select name="r_id">
                        <option value="">请选择角色</option>
                        <foreach name="roleList" item="v" key="k" >
                            <option value="{$v['role_id']}">{$v['name']}</option>
                        </foreach>
                    </select>
                    <select name="sta">
                        <option value="">请选择状态</option>
                        <option value="1">正常</option>
                        <option value="0">关闭</option>
                    </select>
                    <input type="hidden" name="m" value="seller"/>
                    <input type="hidden" name="c" value="auth"/>
                    <input type="hidden" name="a" value="administrators"/>
                    <div class="add-ipt">
                        <input placeholder="姓名..." type="text" name="mName" class="add-name" />
                        <button type="submit"></button>
                    </div>
                </form>
            </div>
        </div>
        <div class="permissions-table">
            <table border="0" width="100%">
                <thead>
                <tr>
                    <td>ID</td>
                    <td>姓名</td>
                    <td>手机号</td>
                    <td>邮箱</td>
                    <td>启用</td>
                    <td>角色</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody class="admin-keeper">
                <foreach name="admins" item="admin" key="k" >
                    <tr>
                        <td>{$admin['manager_id']}</td>
                        <td>{$admin['user_name']}</td>
                        <td>{$admin['mobile']}</td>
                        <td>{$admin['email']}</td>
                        <td>
                            <if condition="$admin['manager_id'] neq 1">
                                <if condition="$admin['m_status'] eq 1">
                                    <a class="yes" onClick="changeTableVal('manager','id','{$admin.manager_id}','m_status',this)"><i class="fa fa-check-circle"></i> 是</a>
                                    <else/>
                                    <a class="no" onClick="changeTableVal('manager','id','{$admin.manager_id}','m_status',this)"><i class="fa fa-ban"></i> 否</a>
                                </if>
                            </if>
                        </td>
                        <td>{$admin['role_name']}</td>
                        <td><a href="{:U('Auth/edit_admin',array('id'=>$admin['manager_id']))}" class="btn btn-blue">编辑</a></td>
                    </tr>
                </foreach>
                </tbody>
            </table>
            {$page}
        </div>
    </div>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>
<include file="common:__foot__"/>